package com.ossjk.ossjkservlet.system.dao;

import java.sql.SQLException;
import java.util.List;

import com.ossjk.core.base.dao.BaseDao;
import com.ossjk.core.vo.Page;
import com.ossjk.ossjkservlet.system.pojo.User;
import com.ossjk.ossjkservlet.system.vo.UserVo;

public class UserDao extends BaseDao<User> {
	public static void main(String[] args) throws SQLException {
		UserDao userDao = new UserDao();
		List<UserVo> userVos = userDao.selectByPage(UserVo.class, "select u.* ,d.name rname from user u left join dep d on u.id =d.uid ", new Page());
		for (UserVo userVo : userVos) {
			System.out.println(userVo.getName()+ "   "+userVo.getDname());
		}
	}
}